Visualize individual trajectories across categories in R by reshaping data to long format and mapping group IDs to color aesthetics in ggplot2.